<include file="App/Home/View/Public/header.html"/>
<style>
.ui-btn-inline {
	width: 87%;
	margin-top: 2em;
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: none;
	box-shadow: none;
	background-color: #ffc703 !important;
	color: #333 !important;
	text-shadow: none !important;
}
.ui-shadow-inset {
	background-color: rgba(255,255,255,0) !important;
	text-shadow: none;
	border: 1px solid #ffc703 !important;
	box-shadow: none;
	background-color: rgba(0,0,0,0.5) !important;
}
</style>
<!-----------------------------主体内容 开始------------------------------>
<div data-role="main" class="ui-content"> 
  <!------登录表单 开始------->
  <form class="w80p btc_tcoin" method="post" action="" onsubmit="return false;">
    <div class="ui-field-contain padt_5">
      <label for="new_pwd" class="ui-hidden-accessible">{$Think.lang.__XINDENGLUMIMA__}</label>
      <input type="password" name="new_pwd" id="new_pwd" required placeholder="{$Think.lang.__XINDENGLUMIMA__}">
    </div>
    <div class="ui-field-contain padt_5">
      <label for="repwd" class="ui-hidden-accessible">{$Think.lang.__QINGZAICISHURUMIMA__}</label>
      <input type="password" name="repwd" id="repwd" required placeholder="{$Think.lang.__QINGZAICISHURUMIMA__}">
    </div>
    <div class="ui-field-contain padt_5">
      <label for="password" class="ui-hidden-accessible">{$Think.lang.__DENGLUMIMA__}</label>
      <input type="password" name="password" id="password" required placeholder="{$Think.lang.__DENGLUMIMA__}">
    </div>
    <input class="w100p" type="button" onclick="ajaxSubmit();" data-inline="true" value="{$Think.lang.__QUERENXIUGAI__}">
  </form>
  <!------登录表单 结束-------> 
</div>
<!-----------------------------主体内容 结束------------------------------> 
<script type="text/javascript">
	function ajaxSubmit(){
		var password = $('#password').val();
		var new_pwd = $('#new_pwd').val();
		var repwd = $('#repwd').val();
		if(password == ""){
			layer.msg("{$Think.lang.__QINGSHURUNIDEMIMA__}");
			$("#password").focus();return false;
		}
		if(new_pwd == ""){
			layer.msg("{$Think.lang.__QINGSHURUXINMIMA__}");
			$("#new_pwd").focus();return false;
		}
		if(repwd == ""){
			layer.msg("{$Think.lang.__QINGZAICISHURUMIMA__}");
			$("#repwd").focus();return false;
		}
		$.ajax({
			url:"{:U('Person/password')}",
			type:"POST",
			data:{'password':password,"new_pwd":new_pwd,"repwd":repwd},
			dataType:"JSON",
			success:function (data){
				layer.msg(data.info);
				if(data.status == 1){
					setTimeout(function(){window.location.reload();},2000);
				}
			}
		})
	}
</script> 
<include file="App/Home/View/Public/footer.html"/>